<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"></meta>
    <title>uploadcontent</title>
</head>
<body>
<uploadcontent th:fragment="uploadcontent">
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>文件上传</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="index">Home</a></li>
                            <li class="breadcrumb-item active">文件上传</li>
                            <div class="tipmsg" th:if="${status}">
                                <span th:text="${status=='success'?'修改成功':'原密码错误！'}"
                                      style="margin-right: 25px"></span><i class="fas fa-times"
                                                                           onclick="closeTip()"></i>
                            </div>
                            <div class="tipmsg1" style="display: none">

                            </div>
                        </ol>
                    </div>
                </div>
            </div><!-- /.container-fluid -->
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <div class="col-12 col-sm-12 col-lg-8">
                        <div class="card">
                            <div class="card-header">
                                <h4>当前路径</h4>
                                <nav aria-label="breadcrumb" class="empty-space">
                                    <ol class="breadcrumb">
                                        <li class="breadcrumb-item"><a
                                                th:href="@{/upload(fId=${nowFolder.fileFolderId})}"
                                                title="刷新"><i
                                                class="icon ion-refresh"></i></a>
                                        </li>
                                        <li th:class="${nowFolder.fileFolderId == 0?'breadcrumb-item active':'breadcrumb-item'}">
                                                            <span th:if="${nowFolder.fileFolderId == 0}"
                                                                  th:text="根目录"></span><a style="font-weight: bold"
                                                                                          th:if="${nowFolder.fileFolderId != 0}"
                                                                                          href="upload">根目录</a></li>
                                        <li th:each="l:${location}" class="breadcrumb-item"><a
                                                style="font-weight: bold"
                                                th:href="@{/upload(fId=${l.fileFolderId},fName=${l.fileFolderName})}"
                                                th:text="${l.fileFolderName}"></a></li>
                                        <li th:if="${nowFolder.fileFolderId != 0}"
                                            class="breadcrumb-item active" aria-current="page"
                                            th:text="${nowFolder.fileFolderName}"></li>
                                        <li th:if="${nowFolder.fileFolderId != 0}"
                                            class="breadcrumb-item"><a
                                                th:href="@{/upload(fId=${nowFolder.parentFolderId})}"
                                                title="返回上一层"><i
                                                class="icon ion-arrow-return-left"></i></a>
                                        </li>
                                    </ol>
                                </nav>
                            </div>
                            <div class="card-body table-responsive">
                                <div id="uploader" style="margin-top: -10px;"></div>
                            </div>
                        </div>
                    </div>
                    <div class="col-12 col-sm-12 col-lg-4">
                        <div class="card">
                            <div class="card-header">
                                <h4>子目录</h4>
                            </div>
                            <div class="card-body">
                                <div class="row" style="margin-top: -10px;">
                                    <div class="col-12 col-sm-12 col-lg-12 table-responsive">
                                        <table class="table tab-bordered text-nowrap" id="files-table">
                                            <tr th:each="folder:${folders}" class="files-items folders">
                                                <td><span style="display: none" th:text="${folder.fileFolderId}"></span><i
                                                        style="font-size: 24px;color: orange"
                                                        class="icon ion-android-folder"></i></td>
                                                <td>
                                                    <a th:href="@{/upload(fId=${folder.fileFolderId},fName=${folder.fileFolderName})}"
                                                       style="font-weight: 700;color: black"
                                                       th:text="${folder.fileFolderName}"></a>
                                                </td>
                                                <td style="font-weight: 300"
                                                    th:text="${#dates.format(folder.time,'yyyy-MM-dd HH:mm')}"></td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.row -->
            </div><!-- /.container-fluid -->
            <span id="nowF" style="display: none" th:text="${nowFolder.fileFolderId}"></span>
            <span id="preF" style="display: none" th:text="${nowFolder.parentFolderId}"></span>
            <span id="tarFolder" style="display: none"></span>
        </section>
        <!-- /.content -->
    </div>
</uploadcontent>
</body>
</html>